package com.example.orderservice.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "storage-service")
public interface StorageServiceClient {

    @RequestMapping(value="/storage/deduct", method = RequestMethod.POST)
    Map<String,Object> deductStorage(@RequestParam("id") int id, @RequestParam("num") int num);
}
